/*
   Copyright 2009 Bégaudeau Stéphane

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */

package faneclipse.ast;

/**
 * Umbrella owner and abstract syntax tree node factory. An FanAbstractSyntaxTree instance serves as the common owner of any number of FanAbstractSyntaxTree nodes, and as the factory for creating new FanAbstractSyntaxTree nodes owned by that instance.
 * Abstract syntax trees may be hand constructed by clients, using the newTYPE factory methods to create new nodes, and the various setCHILD methods (see FanAbstractSyntaxTreeNode and its subclasses) to connect them together.
 * Each FanAbstractSyntaxTree node belongs to a unique FanAbstractSyntaxTree instance, called the owning FanAbstractSyntaxTree. The children of an FanAbstractSyntaxTree node always have the same owner as their parent node. If a node from one FanAbstractSyntaxTree is to be added to a different FanAbstractSyntaxTree, the subtree must be cloned first to ensures that the added nodes have the correct owning FanAbstractSyntaxTree.
 * There can be any number of FanAbstractSyntaxTree nodes owned by a single FanAbstractSyntaxTree instance that are unparented. Each of these nodes is the root of a separate little tree of nodes. The method FanAbstractSyntaxTreeNode.getRoot() navigates from any node to the root of the tree that it is contained in. Ordinarily, an FanAbstractSyntaxTree instance has one main tree (rooted at a CompilationUnit), with newly-created nodes appearing as additional roots until they are parented somewhere under the main tree. One can navigate from any node to its FanAbstractSyntaxTree instance, but not conversely.
 * The class FanAbstractSyntaxTreeParser parses a string containing a Java source code and returns an abstract syntax tree for it. The resulting nodes carry source ranges relating the node back to the original source characters.
 * Compilation units created by FanAbstractSyntaxTreeParser from a source document can be serialized after arbitrary modifications with minimal loss of original formatting.
 * Here is an example:
 * {@codeDocument doc = new Document("import java.util.List;\nclass X {}\n");
 * FanAbstractSyntaxTreeParser parser = FanAbstractSyntaxTreeParser.newParser(AST.JLS3);
 * parser.setSource(doc.get().toCharArray());
 * CompilationUnit cu = (CompilationUnit) parser.createAST(null);
 * cu.recordModifications();
 * FanAbstractSyntaxTree ast = cu.getFanAbstractSyntaxTree();
 * ImportDeclaration id = ast.newImportDeclaration();
 * id.setName(ast.newName(new String[] {"java", "util", "Set"});
 * cu.imports().add(id); // add import declaration at end
 * TextEdit edits = cu.rewrite(document, null);
 * UndoEdit undo = edits.apply(document);}
 * Clients may create instances of this class using newFanAbstractSyntaxTree(int), but this class is not intended to be subclassed.
 * @author BEGAUDEAU stephane
 */
public final class FanAbstractSyntaxTree {
	
	/**
	 * The constructor.
	 */
	private FanAbstractSyntaxTree() {
		
	}
}
